n = int(input())
max = 0
for i in range(n):
    y = int(input())
    if y > max:
        max = y
print(max)
